package com.cloudptt.wp.utils;


import android.content.Context;

import com.cloudptt.api.comm.CommInfo;
import com.cloudptt.api.models.VersionInfo;
import com.cloudptt.wp.R;

public class Common {
	private Context ctx = null;

	public static String getVersion(Context ctx) {
		try {
			VersionInfo verInfo = CommInfo.getVersionInfo(ctx);
			String version = verInfo.getName() + "(" + verInfo.getVersionCode() + ")";
			return ctx.getString(R.string.current_version) + version;
		} catch (Exception e) {
			e.printStackTrace();
			return "";
		}
	}
}
